/**
 * File: cs3343-Satir-Therapy/src/programtest/BoardTest.java
 *  
 * Responsible author: Lai Hing Hung, Dennis					Revision no: 1.0
 * Checked in at date: 2012/03/
 * Log: testToolGrid(), testEventGrid(), testSayAndActionGrid()
 * 
 */
package programtest;
import junit.framework.*;
import program.*;
/**
 * @author Lai Hing Hung, Dennis
 * @category test case
 *
 */
public class BoardTest extends TestCase {
	
	/**
	 * Test case: Board_1
	 * Test tool grid.
	 */
	public void testMagicToolGrid(){
		Board board = new Board();
		int[] magicToolGrid = board.getMagicToolGrid();
		
		// check whether grid 6 is a tool grid
		assertEquals(magicToolGrid[0], 6);		
		// check whether grid 13 is a tool grid
		assertEquals(magicToolGrid[1], 13);		
		// check whether grid 23 is a tool grid
		assertEquals(magicToolGrid[2], 23);
	}
	
	/**
	 * Test case: Board_2 
	 * Test event grid.
	 */
	public void testEventGrid(){
		Board board = new Board();
		int[] eventGrid = board.getEventGrid();

		// check whether grid 3 is an event grid
		assertEquals(eventGrid[0], 3);
		// check whether grid 12 is an event grid
		assertEquals(eventGrid[1], 12);
		// check whether grid 21 is an event grid
		assertEquals(eventGrid[2], 21);
		// check whether grid 27 is an event grid
		assertEquals(eventGrid[3], 27);
	}
	
	/**
	 * Test case: Board_3 
	 * Test say and action grid.
	 */
	public void testSayAndActionGrid(){
		Board board = new Board();
		int[] sayAndActionGrid = board.getSayAndActionGrid();

		// check whether grid 4 is a say/action grid
		assertEquals(sayAndActionGrid[0], 4);
		// check whether grid 10 is a say/action grid
		assertEquals(sayAndActionGrid[1], 10);
		// check whether grid 17 is a say/action grid
		assertEquals(sayAndActionGrid[2], 17);
		// check whether grid 19 is a say/action grid
		assertEquals(sayAndActionGrid[3], 19);
		// check whether grid 25 is a say/action grid
		assertEquals(sayAndActionGrid[4], 25);
	}
	
}
